package IO.Buffered;

import java.io.*;

/**
 * 文件字符流的读取
 */
public class BufferedTest03 {
    public static void main(String[] args) {
        //创建源
        File src = new File("src/IO/abc.txt");

        //选择流
        BufferedReader reader = null;

        try {
            reader = new BufferedReader(new FileReader(src));
            //操作
            String line = null;
            while ((line=reader.readLine())!=null){
                System.out.println(line);
            }
            //关闭
            reader.close();
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
